package example.services.impl;

import example.dao.ActionDao;
import example.dto.Children;
import example.dto.ChildrenInfo;
import example.dto.ChildrenInfoList;
import example.dto.Product;
import example.services.MyTestServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MyTestServicesImpl implements MyTestServices{
    @Autowired
    ActionDao actionDao;


    //插入主商品
    @Override
    public int insertPhone_Product(List<Product> productList) {
        return actionDao.insertPhone_Product(productList);
    }


    //查询主商品
    @Override
    public List<Product> findAll_Product() {
        return actionDao.findAll_Product();
    }
    //查询主商品的ID
    @Override
    public Integer findProduct_ID(String pName) {
        return actionDao.findProduct_ID(pName);
    }

    //查询子商品
    @Override
    public List<Children> findAll_Children() {
        return actionDao.findAll_Children();
    }

    //插入子商品
    @Override
    public int insertPhone_Children(List<Children> childrenList) {
        return actionDao.insertPhone_Children(childrenList);
    }

    @Override
    public int deletePhone_Children() {
        return actionDao.deletePhone_Children();
    }

    @Override
    public int updatePhone_Children(List<Children> childrenList) {
        return actionDao.updatePhone_Children(childrenList);
    }


    @Override
    public int insertPhone_ChildreninfoList(List<ChildrenInfoList> childrenInfoLists) {
        return actionDao.insertPhone_ChildreninfoList(childrenInfoLists);
    }

    @Override
    public int insertPhone_Childreninfo(List<ChildrenInfo> childrenInfoList) {
        return actionDao.insertPhone_Childreninfo(childrenInfoList);
    }

    @Override
    public List<ChildrenInfo> findAll_ChildrenInfo() {
        return actionDao.findAll_ChildrenInfo();
    }

    @Override
    public List<String> findChildrenInfo_ID(String id) {
        return actionDao.findChildrenInfo_ID(id);
    }
}
